package com.qxy.hgz.user.vm

/**
 * @Description:    RequestAdapter
 * @Author:         agan
 * @CreateDate:     2022/7/29 10:34 上午
 */
abstract class RequestAdapter<T> {

    var mRequest: T? = null

    fun request(){
        mRequest = startRequest()
    }

    fun cancel(){
        cancelRequest(mRequest)
    }

    protected abstract fun startRequest(): T

    protected abstract fun cancelRequest(request: T?)

}